#include "helloworld.h"

std::string HelloWorld::to_string() {
    return "hello"
#ifdef NEWWORLD
    " new"
#endif
    " world!"
    " version " + version_str() + "\n"
    "build time: " __DATE__ " "  __TIME__ + "\n"
    "system: " + SYSTEM_STR + "\n"
    "compiler: " + COMPILER_STR + "\n";
}

HelloWorld::version_t HelloWorld::version() {
    return version_t(
            HelloWorld::VERSION_MAJOR, 
            HelloWorld::VERSION_MINOR, 
            HelloWorld::VERSION_BUILD
           );
}

std::string HelloWorld::version_str() {
    return std::to_string(VERSION_MAJOR)
        + "." + std::to_string(VERSION_MINOR)
        + "." + std::to_string(VERSION_BUILD);
}

